package com.tsd.system.dao;

import com.tsd.core.vo.PageBean;
import com.tsd.system.entity.SysBugWorksheet;
import com.tsd.system.entity.SysBugWorksheetExt;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

/**
 * 描述：SysBugWorksheetMapper
 *
 * @author david
 * @date 2022/09/27 17:58:22
 */
public interface SysBugWorksheetMapper {

    SysBugWorksheet selectByPrimaryKey(Long id);

    SysBugWorksheetExt selectBySid(String sid);

    int deleteByPrimaryKey(Long id);

    int insert(SysBugWorksheet record);

    int insertSelective(SysBugWorksheet record);

    int insertList(List<SysBugWorksheet> list);

    int updateByPrimaryKey(SysBugWorksheet record);

    int updateByPrimaryKeySelective(SysBugWorksheet record);

    List<SysBugWorksheetExt> selectByEntity(SysBugWorksheet record);

    List<SysBugWorksheetExt> selectByPage(@Param("params") Map<String, Object> params, @Param("page") PageBean page);

    List<SysBugWorksheetExt> selectCount1Page(@Param("params") Map<String, Object> params, @Param("page") PageBean page);

    List<SysBugWorksheetExt> selectByParams(@Param("params") Map<String, Object> params);

    List<SysBugWorksheetExt> selectSysBugWorksheetsByParentSid(String parent_sid);

    List<SysBugWorksheetExt> selectByParentSids(@Param("list") List<String> list, @Param("dr") int dr);

    //批量插入，mysql默认接受sql的大小是1048576(1M)，此方式若数据量超过1M会报如下异常：（可通过调整MySQL安装目录下的my.ini文件中[mysqld]段的＂max_allowed_packet = 1M＂）
    //void insertList(List<SysBugWorksheet> list);
}